
import React, { Component } from 'react';
import {withRouter} from "react-router-dom";

class Son extends Component {

  // constructor(props){
  //   super(props);
  //   this.props = props;
  //   console.log("Son: this.props",this.props);
  // }

  goUrl=()=>{
    console.log("Son: this.props",this.props);
  }

  render() {
    return (
      <>
      <div>Son</div>
      <input type="button" value="跳到其它页面" onClick={this.goUrl}/>
      </>
    )
  }
}

export default withRouter(Son);